function sw(f,fi)
   global  wi w dyT dif C1 C2 %cpe %pii pei jpara delta_deni

%    wii=wi+wi0;
   fxy=C1*dyT+convect(wi);

   fxy = fxy - C2*dif3(w);

   work=w*f+wi*fi-fxy;
  %%
   if(f<0.6)%the 1st time
       w=wi;
       wi=work;
   else %the 2nd time
       wi=work;
   end
end
